// 1.0 导入vue核心包
import Vue from 'vue';

// 2.0 导入App.vue的vue对象
import App from './App.vue';
import VueRouter from 'vue-router';
Vue.use(VueRouter)
import { Lazyload } from 'mint-ui';
Vue.use(Lazyload);
// 3.0 利用Vue对象进行解析渲染
import Home from './components/Home.vue';
import newslist from  './components/news/newslist.vue';
import newsinfo from './components/news/newsinfo.vue';
import photolist from './components/photo/photolist.vue';
import goodslist from './components/goods/goodslist.vue';
import photoinfo from './components/photo/photoinfo.vue';
var router=new VueRouter({
	linkActiveClass :'mui-active',
	routes:[
		{path:'/',redirect:'/home'},
        {path:'/home',component:Home},
        {path:'/news/newslist',component:newslist},
        {path:'/news/newsinfo/:id',component:newsinfo},
        {path:'/photo/photolist',component:photolist},
        {path:'/goods/goodslist',component:goodslist},
        {path:'/photo/photoinfo/:id',component:photoinfo}

    ]
});
import 'mint-ui/lib/style.min.css';
import mintui from 'mint-ui';
Vue.use(mintui);



import '../statics/mui/css/mui.css';
import '../statics/mui/css/icons-extra.css'
import vueResource from 'vue-resource';
Vue.use(vueResource);
import '../statics/css/site.css';

import moment from 'moment';
Vue.filter('datefmt',function(input,fmtstring){
    return moment(input).format(fmtstring)
});

new Vue({
	el:'#app',
	router:router,
	// render:function(create){create(App)} //es5的写法
	render:c=>c(App)  // es6的函数写法 =>：goes to
});